
*ssc install factortest
*net install polychoric, from(http://staskolenikov.net/stata)
*ssc install subsetbyvif, update
*net install st0249.pkg
*do this just once
*mata: mata mlib index
/*
ssc install grstyle, replace

set scheme s1color
*net install labloadingplot, from(http://www.radyakin.org/stata/labloadingplot/)
grstyle init
*grstyle set color lpattern
*grstyle set ptol, rainbow n(8) reverse
*/

*net install st0249.pkg




clear all
mata: mata clear

*WANT TO GET JUST THE DATA NOT USED IN MAIN SPEC!!!!!!

use "C:/Users/awcassidy1\Dropbox\jmp_new/cleaned_data/estimation_temp.dta", clear
keep if !missing(pricediff)
save "C:/Users/awcassidy1\Dropbox\jmp_new/cleaned_data/data_used_in_main_regs.dta", replace

*get test data
use "C:/Users/awcassidy1\Dropbox\jmp_new\cleaned_data/audit_3.dta", clear

merge 1:m delivery_point_barcode using "C:/Users/awcassidy1\Dropbox\jmp_new\cleaned_data/data_used_in_main_regs.dta", keep(1)
save "C:/Users/awcassidy1\Dropbox\jmp_new\cleaned_data/test_data.dta", replace